/**
 * Created by Administrator on 2017/3/2 0002.
 */
var Page4={
    create:function () {
        var page={};
        page.ui=new PIXI.DisplayObjectContainer();
        var bg=new PIXI.Sprite(resource['assets/images/p4_0.png'].texture);
        bg.alpha=0;

        var arr_texture=[];
        for(var i=0;i<33;i++)
        {
            if(i<10)
            {
                var texture = resource['assets/images/4/P05-GIF.0'+i.toString()+'.jpg'].texture;
            }
            else
            {
                var texture = resource['assets/images/4/P05-GIF.'+i.toString()+'.jpg'].texture;
            }

            arr_texture.push(texture);
        }
        var mc=new PIXI.extras.AnimatedSprite(arr_texture);
        mc.width=pixiStageW;
        mc.height=pixiStageH;
        mc.animationSpeed=0.3;

        page.ui.addChild(mc);
        page.ui.addChild(bg);


        page.In=function () {
            TweenMax.killChildTweensOf(bg);
            bg.alpha=0;
            TweenMax.to(bg,1,{alpha:1})
            mc.gotoAndPlay(1);
        }
        page.Out=function () {
            mc.stop();
            TweenMax.to(bg,0.2,{alpha:0});
        }
        return page;
    }
}